extends Node2D

@onready var bg = $TextureRect

var start_x
var start_y

func _ready() -> void:
	start_x = bg.position.x
	start_y = bg.position.y

func move_tiles():
	bg.position.x -= 0.2
	bg.position.y -= 0.2
	
	if bg.position.x <= start_x - 64:
		bg.position.x = start_x
		bg.position.y = start_y

func _process(delta: float) -> void:
	move_tiles()
